<%--
  Created by IntelliJ IDEA.
  User: T156吴志豪
  Date: 2018/5/7
  Time: 8:48
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<form id="add-roomorder-form">
    <div class="form-group">
        <label for="roomorderid">房间订单</label>
        <select name="roomorderid" id="roomorderid">

        </select>
    </div>
    <div class="form-group">
        <label for="date">退房时间</label>
        <input type="date" class="form-control" name="date" id="date" placeholder="请输入退房时间">
    </div>
    <div class="form-group">
        <label for="dustmanid">清洁工</label>
        <select id="dustmanid" name="dustmanid">
            <c:forEach items="${dustmanList}" var="dustman">
                <option value="${dustman.id}">${dustman.name}</option>
            </c:forEach>
        </select>
    </div>
</form>
<script>
    $(function () {
        $.post("/room/getPartRoomOrderByState",
            {"stateName": "正在使用"},
            function (data) {
                $.each(data.roomOrderList, function (i, j) {
                    $("#roomorderid").append("<option value='" + j.id + "'>" + j.id + "&nbsp&nbsp" + j.startdate + "</option>");
                });
            }, "json"
        );
    });
</script>